package View;

import javax.swing.*;

import java.awt.Color;
import java.awt.GridLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import com.toedter.calendar.JDateChooser;

public class TelaMeta extends JPanel{

	JTabbedPane meta;
	JPanel m, dia;
	JScrollPane scrollPane;
	
	public TelaMeta() {
		setLayout(new GridLayout(0, 1, 0, 0));
		meta = new JTabbedPane(JTabbedPane.BOTTOM);
		m = new JPanel();
		meta.addTab("META", null, m, null);
		m.setBackground(null);
		
		scrollPane = new JScrollPane();
		scrollPane.getViewport().setBackground(new Color(100, 175, 239));
		
		GroupLayout gl_m = new GroupLayout(m);
		gl_m.setHorizontalGroup(
			gl_m.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_m.createSequentialGroup()
					.addContainerGap()
					.addComponent(scrollPane)
					.addContainerGap())
		);
		gl_m.setVerticalGroup(
			gl_m.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_m.createSequentialGroup()
					.addContainerGap()
					.addComponent(scrollPane)
					.addGap(31))
		);
		
		JPanel panel = new JPanel();
		panel.setBackground(null);
		scrollPane.setViewportView(panel);
		
		dia = new JPanel();
		dia.setBackground(null);
		dia.setBorder(BorderFactory.createTitledBorder("MINIMO POR DIA"));
		
		JLabel lblIniciarMetaEm = new JLabel("INICIAR EM");
		lblIniciarMetaEm.setHorizontalAlignment(SwingConstants.RIGHT);
		
		JDateChooser dateChooser = new JDateChooser();
		
		JLabel lblFinalizarEm = new JLabel("FINALIZAR EM");
		
		JDateChooser dateChooser_1 = new JDateChooser();
		
		JLabel lblAgendamentos = new JLabel("AGENDAMENTOS");
		lblAgendamentos.setHorizontalAlignment(SwingConstants.RIGHT);
		
		JSpinner spinner_2 = new JSpinner();
		
		JLabel lblTratamentos = new JLabel("TRATAMENTOS");
		
		JSpinner spinner_3 = new JSpinner();
		
		JLabel lblPacientes_1 = new JLabel("PACIENTES");
		
		JSpinner spinner_4 = new JSpinner();
		
		JLabel lblLucroMnimo = new JLabel("LUCRO M\u00CDNIMO");
		
		JFormattedTextField formattedTextField_1 = new JFormattedTextField();
		
		JLabel lblEstadoDaMeta_1 = new JLabel("ESTADO DA META DIARIA");
		
		JButton btnOk_1 = new JButton("OK");
		
		JLabel lblPacientes = new JLabel("PACIENTES");
		lblPacientes.setHorizontalAlignment(SwingConstants.RIGHT);
		
		JLabel lblTratamentosRealizados = new JLabel("TRATAMENTOS REALIZADOS");
		
		JLabel lblLucroTotal = new JLabel("LUCRO TOTAL");
		lblLucroTotal.setHorizontalAlignment(SwingConstants.RIGHT);
		
		JSpinner spinner = new JSpinner();
		
		JSpinner spinner_1 = new JSpinner();
		
		JFormattedTextField formattedTextField = new JFormattedTextField();
		
		JButton btnOk = new JButton("OK");
		
		JLabel lblEstadoDaMeta = new JLabel("ESTADO DA META DIARIA");
		lblEstadoDaMeta.setHorizontalAlignment(SwingConstants.CENTER);
		GroupLayout gl_dia = new GroupLayout(dia);
		gl_dia.setHorizontalGroup(
			gl_dia.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_dia.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_dia.createParallelGroup(Alignment.TRAILING, false)
						.addComponent(lblLucroTotal, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
						.addComponent(lblPacientes, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
						.addComponent(lblTratamentosRealizados, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					.addGap(24)
					.addGroup(gl_dia.createParallelGroup(Alignment.LEADING)
						.addComponent(btnOk)
						.addGroup(gl_dia.createSequentialGroup()
							.addGroup(gl_dia.createParallelGroup(Alignment.LEADING, false)
								.addComponent(formattedTextField)
								.addComponent(spinner, GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
								.addComponent(spinner_1))
							.addPreferredGap(ComponentPlacement.RELATED, 116, Short.MAX_VALUE)
							.addComponent(lblEstadoDaMeta, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap())
		);
		gl_dia.setVerticalGroup(
			gl_dia.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_dia.createSequentialGroup()
					.addGroup(gl_dia.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblPacientes)
						.addComponent(spinner, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(lblEstadoDaMeta))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_dia.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblTratamentosRealizados)
						.addComponent(spinner_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
					.addComponent(btnOk)
					.addGap(18)
					.addGroup(gl_dia.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblLucroTotal)
						.addComponent(formattedTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addContainerGap())
		);
		dia.setLayout(gl_dia);
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(10)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(lblIniciarMetaEm, GroupLayout.PREFERRED_SIZE, 136, GroupLayout.PREFERRED_SIZE)
						.addComponent(lblAgendamentos, GroupLayout.PREFERRED_SIZE, 136, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_panel.createSequentialGroup()
							.addGap(62)
							.addComponent(lblTratamentos))
						.addGroup(gl_panel.createSequentialGroup()
							.addGap(81)
							.addComponent(lblPacientes_1))
						.addGroup(gl_panel.createSequentialGroup()
							.addGap(62)
							.addComponent(lblLucroMnimo)))
					.addGap(8)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(dateChooser, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(spinner_2, GroupLayout.PREFERRED_SIZE, 87, GroupLayout.PREFERRED_SIZE)
						.addComponent(spinner_3, GroupLayout.PREFERRED_SIZE, 87, GroupLayout.PREFERRED_SIZE)
						.addComponent(spinner_4, GroupLayout.PREFERRED_SIZE, 87, GroupLayout.PREFERRED_SIZE)
						.addComponent(formattedTextField_1, GroupLayout.PREFERRED_SIZE, 87, GroupLayout.PREFERRED_SIZE))
					.addGap(4)
					.addComponent(lblFinalizarEm)
					.addGap(4)
					.addComponent(dateChooser_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(86)
					.addComponent(dia, GroupLayout.PREFERRED_SIZE, 422, Short.MAX_VALUE)
					.addContainerGap())
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(166)
					.addComponent(btnOk_1)
					.addGap(10)
					.addComponent(lblEstadoDaMeta_1))
		);
		gl_panel.setVerticalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(11)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(dia, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_panel.createSequentialGroup()
							.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_panel.createSequentialGroup()
									.addComponent(lblIniciarMetaEm)
									.addGap(24)
									.addComponent(lblAgendamentos)
									.addGap(21)
									.addComponent(lblTratamentos)
									.addGap(22)
									.addComponent(lblPacientes_1)
									.addGap(28)
									.addComponent(lblLucroMnimo))
								.addGroup(gl_panel.createSequentialGroup()
									.addComponent(dateChooser, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addGap(15)
									.addComponent(spinner_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addGap(15)
									.addComponent(spinner_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addGap(16)
									.addComponent(spinner_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addGap(22)
									.addComponent(formattedTextField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
								.addGroup(gl_panel.createSequentialGroup()
									.addGap(6)
									.addComponent(lblFinalizarEm))
								.addComponent(dateChooser_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
							.addGap(17)
							.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
								.addComponent(btnOk_1)
								.addGroup(gl_panel.createSequentialGroup()
									.addGap(4)
									.addComponent(lblEstadoDaMeta_1)))))
					.addGap(198))
		);
		panel.setLayout(gl_panel);
		m.setLayout(gl_m);
		add(meta);

	}
}